#include "StdAfx.h"
#include ".\MFCWPFPage.h"

CMFCWPFPage::CMFCWPFPage(void)
{
}

///<summary>
///construnt a page from a given file
///</summary>
///<param name='szFileName'>
///the xaml file name
///</param>
///<param name='oRect'>
///the page's region
///</param>
CMFCWPFPage::CMFCWPFPage(const CString & szFileName, const CRect & oRect)
{
	CECGXmlParser oXamlParser;

	if (ERROR_ECGXML_SUCCESS == oXamlParser.LoadFile(szFileName))
	{
		CString szPath = _ROOTNODEPAGE;
		Parse(szPath, &oXamlParser, oRect);
	}
	else
	{
		AfxMessageBox(_LOADFILEERROR);
	}
}

CMFCWPFPage::~CMFCWPFPage(void)
{
}